3.4.83 \(\int \frac {(a+b \log (c (d+e x)^n)) (f+g \log (c (d+e x)^n))}{x^2} \, dx\) [383]

Optimal. Leaf size=96 \[ -\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}+\frac {e n \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right ) \log \left (1-\frac {d}{d+e x}\right )}{d}-\frac {2 b e g n^2 \text {Li}_2\left (\frac {d}{d+e x}\right )}{d} \]

[Out]

-(a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n))/x+e*n*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n))*ln(1-d/(e*x+d))/d-2*b*e*g*n
^2*polylog(2,d/(e*x+d))/d

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2483, 2458, 2379, 2438} \begin {gather*} -\frac {2 b e g n^2 \text {PolyLog}\left (2,\frac {d}{d+e x}\right )}{d}+\frac {e n \log \left (1-\frac {d}{d+e x}\right ) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )}{d}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/x^2,x]

[Out]

-(((a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/x) + (e*n*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n])*Log
[1 - d/(d + e*x)])/d - (2*b*e*g*n^2*PolyLog[2, d/(d + e*x)])/d

Rule 2379

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r_.))), x_Symbol] :> Simp[(-Log[1 +
d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)), x] + Dist[b*n*(p/(d*r)), Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^
(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2483

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(g_.))*
(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*(a + b*Log[c*(d + e*x)^n])*((f + g*Log[c*(d + e*x)^n])/(m + 1)), x] -
Dist[e*(n/(m + 1)), Int[(x^(m + 1)*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]))/(d + e*x), x], x] /; FreeQ[{a, b, c
, d, e, f, g, n, m}, x] && NeQ[m, -1]

Rubi steps

\begin {align*} \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x^2} \, dx &=-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}+(b e n) \int \frac {f+g \log \left (c (d+e x)^n\right )}{x (d+e x)} \, dx+(e g n) \int \frac {a+b \log \left (c (d+e x)^n\right )}{x (d+e x)} \, dx\\ &=-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}+(b n) \text {Subst}\left (\int \frac {f+g \log \left (c x^n\right )}{x \left (-\frac {d}{e}+\frac {x}{e}\right )} \, dx,x,d+e x\right )+(g n) \text {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x \left (-\frac {d}{e}+\frac {x}{e}\right )} \, dx,x,d+e x\right )\\ &=-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}+\frac {(b n) \text {Subst}\left (\int \frac {f+g \log \left (c x^n\right )}{-\frac {d}{e}+\frac {x}{e}} \, dx,x,d+e x\right )}{d}-\frac {(b e n) \text {Subst}\left (\int \frac {f+g \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{d}+\frac {(g n) \text {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{-\frac {d}{e}+\frac {x}{e}} \, dx,x,d+e x\right )}{d}-\frac {(e g n) \text {Subst}\left (\int \frac {a+b \log \left (c x^n\right )}{x} \, dx,x,d+e x\right )}{d}\\ &=\frac {e g n \log \left (-\frac {e x}{d}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{d}-\frac {e g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b d}+\frac {b e n \log \left (-\frac {e x}{d}\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{d}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}-\frac {b e \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 d g}-2 \frac {\left (b e g n^2\right ) \text {Subst}\left (\int \frac {\log \left (1-\frac {x}{d}\right )}{x} \, dx,x,d+e x\right )}{d}\\ &=\frac {e g n \log \left (-\frac {e x}{d}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{d}-\frac {e g \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 b d}+\frac {b e n \log \left (-\frac {e x}{d}\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{d}-\frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )}{x}-\frac {b e \left (f+g \log \left (c (d+e x)^n\right )\right )^2}{2 d g}+\frac {2 b e g n^2 \text {Li}_2\left (1+\frac {e x}{d}\right )}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 180, normalized size = 1.88 \begin {gather*} -\frac {a f}{x}+\frac {b e f n \log (x)}{d}+\frac {a e g n \log (x)}{d}-\frac {b e f n \log (d+e x)}{d}-\frac {a e g n \log (d+e x)}{d}-\frac {b f \log \left (c (d+e x)^n\right )}{x}-\frac {a g \log \left (c (d+e x)^n\right )}{x}+\frac {2 b e g n \log \left (-\frac {e x}{d}\right ) \log \left (c (d+e x)^n\right )}{d}-\frac {b e g \log ^2\left (c (d+e x)^n\right )}{d}-\frac {b g \log ^2\left (c (d+e x)^n\right )}{x}+\frac {2 b e g n^2 \text {Li}_2\left (\frac {d+e x}{d}\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/x^2,x]

[Out]

-((a*f)/x) + (b*e*f*n*Log[x])/d + (a*e*g*n*Log[x])/d - (b*e*f*n*Log[d + e*x])/d - (a*e*g*n*Log[d + e*x])/d - (
b*f*Log[c*(d + e*x)^n])/x - (a*g*Log[c*(d + e*x)^n])/x + (2*b*e*g*n*Log[-((e*x)/d)]*Log[c*(d + e*x)^n])/d - (b
*e*g*Log[c*(d + e*x)^n]^2)/d - (b*g*Log[c*(d + e*x)^n]^2)/x + (2*b*e*g*n^2*PolyLog[2, (d + e*x)/d])/d

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.34, size = 931, normalized size = 9.70

method result size
risch \(\text {Expression too large to display}\) \(931\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n))/x^2,x,method=_RETURNVERBOSE)

[Out]

-e*n/d*ln(e*x+d)*a*g-e*n/d*ln(e*x+d)*b*f+e*n/d*ln(x)*a*g+e*n/d*ln(x)*b*f-ln((e*x+d)^n)/x*a*g-ln((e*x+d)^n)/x*b
*f-1/x*b*g*ln((e*x+d)^n)^2+I*e*n/d*ln(e*x+d)*Pi*b*g*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)-I*e*n/d*ln
(x)*Pi*b*g*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)-2*b*g*e*n*ln((e*x+d)^n)/d*ln(e*x+d)-I*e*n/d*ln(e*x+
d)*Pi*b*g*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-I*ln((e*x+d)^n)/x*Pi*b*g*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-I*ln((e*x+d
)^n)/x*Pi*b*g*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2+I*e*n/d*ln(x)*Pi*b*g*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^
n)^2-2*b*g*e*n^2/d*ln(x)*ln((e*x+d)/d)-2*e*n/d*ln(e*x+d)*ln(c)*b*g+2*e*n/d*ln(x)*ln(c)*b*g+I*ln((e*x+d)^n)/x*P
i*b*g*csgn(I*c*(e*x+d)^n)^3-1/4*(-I*b*Pi*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I*b*Pi*csgn(I*c)*csgn
(I*c*(e*x+d)^n)^2+I*b*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2-I*b*Pi*csgn(I*c*(e*x+d)^n)^3+2*b*ln(c)+2*a)*(
-I*g*Pi*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I*g*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2+I*g*Pi*csgn(I*(
e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2-I*g*Pi*csgn(I*c*(e*x+d)^n)^3+2*g*ln(c)+2*f)/x-2*ln((e*x+d)^n)/x*ln(c)*b*g-I*e*
n/d*ln(e*x+d)*Pi*b*g*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2+I*e*n/d*ln(x)*Pi*b*g*csgn(I*c)*csgn(I*c*(e*x+d)^n
)^2-2*b*g*e*n^2/d*dilog((e*x+d)/d)+b*g*e*n^2/d*ln(e*x+d)^2+I*e*n/d*ln(e*x+d)*Pi*b*g*csgn(I*c*(e*x+d)^n)^3+I*ln
((e*x+d)^n)/x*Pi*b*g*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+2*b*g*e*n*ln((e*x+d)^n)/d*ln(x)-I*e*n/d*l
n(x)*Pi*b*g*csgn(I*c*(e*x+d)^n)^3

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n))/x^2,x, algorithm="maxima")

[Out]

-b*f*n*(log(x*e + d)/d - log(x)/d)*e - a*g*n*(log(x*e + d)/d - log(x)/d)*e - b*g*(log((x*e + d)^n)^2/x - integ
rate((x*e*log(c)^2 + d*log(c)^2 + 2*((n + log(c))*x*e + d*log(c))*log((x*e + d)^n))/(x^3*e + d*x^2), x)) - b*f
*log((x*e + d)^n*c)/x - a*g*log((x*e + d)^n*c)/x - a*f/x

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n))/x^2,x, algorithm="fricas")

[Out]

integral((b*g*log((x*e + d)^n*c)^2 + a*f + (b*f + a*g)*log((x*e + d)^n*c))/x^2, x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right ) \left (f + g \log {\left (c \left (d + e x\right )^{n} \right )}\right )}{x^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))*(f+g*ln(c*(e*x+d)**n))/x**2,x)

[Out]

Integral((a + b*log(c*(d + e*x)**n))*(f + g*log(c*(d + e*x)**n))/x**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n))/x^2,x, algorithm="giac")

[Out]

integrate((b*log((x*e + d)^n*c) + a)*(g*log((x*e + d)^n*c) + f)/x^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )\,\left (f+g\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}{x^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*log(c*(d + e*x)^n))*(f + g*log(c*(d + e*x)^n)))/x^2,x)

[Out]

int(((a + b*log(c*(d + e*x)^n))*(f + g*log(c*(d + e*x)^n)))/x^2, x)

________________________________________________________________________________________